package com.taobao.txc.parser.a;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.TreeSet;

public class a
{
  private TreeSet<Long> b = new TreeSet();
  private List<b> c = new ArrayList();
  public String a;
  
  public a(String paramString)
  {
    this.a = paramString;
  }
  
  public void a(long paramLong)
  {
    this.b.add(Long.valueOf(paramLong));
  }
  
  private void a()
  {
    this.c.clear();
    Iterator localIterator = this.b.iterator();
    while (localIterator.hasNext())
    {
      long l = ((Long)localIterator.next()).longValue();
      b localb = b(l);
      if (localb.b != l) {
        if (localb.b + 1L == l)
        {
          localb.b += 1L;
        }
        else
        {
          localb = new b(this, l, l);
          this.c.add(localb);
        }
      }
    }
  }
  
  public b b(long paramLong)
  {
    if (this.c.size() == 0)
    {
      b localb = new b(this, paramLong, paramLong);
      this.c.add(localb);
      return localb;
    }
    return (b)this.c.get(this.c.size() - 1);
  }
  
  public String toString()
  {
    a();
    StringBuilder localStringBuilder = new StringBuilder();
    int i = 0;
    for (int j = 0; j < this.c.size(); j++)
    {
      b localb = (b)this.c.get(j);
      if (i != 0) {
        localStringBuilder.append(" OR ");
      } else {
        i = 1;
      }
      if (localb.a == localb.b) {
        localStringBuilder.append(this.a).append(" = ").append(localb.a);
      } else {
        localStringBuilder.append('(').append(this.a).append(" >= ").append(localb.a).append(" AND ").append(this.a).append(" <= ").append(localb.b).append(')');
      }
    }
    return localStringBuilder.toString();
  }
}


/* Location:           C:\Users\ibm\Downloads\txc-yun-sample (1)\txc-yun-sample\lib\txc-client-2.0.72.jar
 * Qualified Name:     com.taobao.txc.parser.a.a
 * JD-Core Version:    0.7.0.1
 */